#include <jni.h>
#include <string>

/**
 * 具体的C++代码实现
 */
extern "C" JNIEXPORT jstring JNICALL Java_com_bawei_jni_NativeLib_stringFromJNI(JNIEnv* env, jobject) {

    //定义字符串
    std::string hello = "Hello from C++ 0000066554 ";

    return env -> NewStringUTF(hello.c_str());
}

extern "C" JNIEXPORT jstring JNICALL Java_com_bawei_jni_NativeLib_stringFromJNITwo(JNIEnv* env, jobject) {

    //定义字符串
    std::string hello = "Hello from C++ 大好时光很好的噶好 ";

    return env -> NewStringUTF(hello.c_str());
}